<!DOCTYPE html>
<html class="x-admin-sm">
{include file='public/header'}
<style>
    .layui-input-block{margin-left: 130px;}
    .layui-form-label{width: 100px;}
</style>
<body>
    <div class="x-body">
        <form class="layui-form" lay-filter="formAjax">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    平台退款单号
                </label>
                <div class="layui-input-block">
                    <input type="text" name="pd_refund_no" disabled class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    退款单号
                </label>
                <div class="layui-input-block">
                    <input type="text" name="refund_no" disabled class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    微信退款单号
                </label>
                <div class="layui-input-block">
                    <input type="text" name="wxRefundNo" disabled class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    退款详情
                </label>
                <div class="layui-input-block">
                    <input type="text" name="refund_detail" disabled class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    退款金额
                </label>
                <div class="layui-input-block">
                    <input type="text" name="refund_money" disabled class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    退款时间
                </label>
                <div class="layui-input-block">
                    <input type="text" name="refund_time" disabled class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    退款状态
                </label>
                <div class="layui-input-block">
                    <input type="text" name="status" disabled class="layui-input" value="" />
                </div>
            </div>
            <input type="hidden" name="id" id="id" value="" />
            <button id="submitData" class="layui-btn" lay-submit lay-filter="submitData" style="display: none;" />
        </form>
    </div>
    <script>
        layui.use(["form", "layer"], function () {
            $ = layui.jquery;
            var form = layui.form;
            let id = GetQueryString('id')
            Ajax('/admin/record/refundQuery',{id},'get').then(result =>{
                let status;
                switch (result.data.status) {
                    case 1:
                        status = '退款成功'
                        break;
                    case 2:
                        status = '退款异常'
                        break;
                    case 3:
                        status = '退款处理中'
                        break;
                    case 4:
                        status = '退款关闭'
                        break;
                    default:
                        status = ''
                        break;
                }
                result.data.status = status
                form.val("formAjax",result.data);
            });
        });
    </script>
</body>

</html>